package com.hspedu.writer_;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

/**
 * @author LiuJinTao
 * @className BufferedWriter_
 * @date 2024/06/28 0:04
 * @description TODO
 */
public class BufferedWriter_ {
    public static void main(String[] args) throws IOException {
        String path = "e:\\b.txt";
        BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(path, true));
        bufferedWriter.write("哈喽，你好哈哈哈哈");
        // 插入一个和系统相关的换行
        bufferedWriter.newLine();
        bufferedWriter.write("哈喽，你好哈哈哈哈");
        bufferedWriter.newLine();
        bufferedWriter.write("哈喽，你好哈哈哈哈");
        bufferedWriter.newLine();
        bufferedWriter.close();
    }
}
